#!/bin/bash
echo "编译 cbp2make_ai wx30_64 版本..."

cd /d/vc/UEStudio/src/tools/cbp2make_ai

# 清理之前的编译结果
rm -rf .objs/wx30_64
mkdir -p .objs/wx30_64 bin

# 编译 wx30_64 版本
g++ -o bin/cbp2make_ai_wx30_64 \
    src/*.cpp lib/*.cpp lib/tinyxml/*.cpp \
    -Ilib -Ilib/tinyxml -Isrc \
    -Wall -std=c++11 -DAICODER_ENHANCED \
    -m64 -D__WXMSW__ -DwxUSE_UNICODE

if [ -f "bin/cbp2make_ai_wx30_64.exe" ]; then
    echo "✅ 编译成功: bin/cbp2make_ai_wx30_64.exe"
    echo "测试新版本..."
    ./bin/cbp2make_ai_wx30_64.exe --help | head -10
else
    echo "❌ 编译失败"
fi
